﻿using System;

namespace DatabaseGroup.SSIS.SourceAdapters.View
{
    /// <summary>
    /// Defines functionality relating to the Advance tab of the Editor view
    /// </summary>
    public interface IEditorAdvanceView : IEditorBaseView
    {
        /// <summary>
        /// Indicates the user has requested a new standard output column to be added
        /// </summary>
        event EventHandler AddNewAdvanceColumn;

        /// <summary>
        /// Indicates the user has requested a new standard output column to be added
        /// and placed before the currently selected column
        /// </summary>
        event IndexEventHandler AddNewAdvanceColumnBefore;

        /// <summary>
        /// Indicates the user has requested a new standard output column to be added
        /// and placed after the currently selected column
        /// </summary>
        event IndexEventHandler AddNewAdvanceColumnAfter;

        /// <summary>
        /// Indicates the user has requested to remove the
        /// currently selected standard output column
        /// </summary>
        event IndexEventHandler RemoveAdvanceColumn;

        /// <summary>
        /// Indicates the currently selected standard output column on the
        /// advance tab has been changed
        /// </summary>
        event IndexEventHandler SelectedAdvanceColumnChanged;

        /// <summary>
        /// Gets or sets the first item displayed in the advance column properties list
        /// </summary>
        int AdvanceColumnTopIndex { get; set; }

        /// <summary>
        /// Binds the controls contained on the advance tab to the provided settings object
        /// </summary>
        /// <param name="settings">The values to apply to the controls</param>
        void BindAdvanceTab(AdvanceTabSettings settings);

        /// <summary>
        /// Sets the selected object of the property grid
        /// </summary>
        /// <param name="columnIndex">The column index to select in the advance column list</param>
        /// <param name="propertiesObject">The properties to be examined within the property grid</param>
        void ViewAdvanceColumnProperties(int columnIndex, object propertiesObject);
    }
}
